CREATE TABLE [dbo].[TDAMAR_ANTC]
(
[CO_EMPR] [dbo].[TD_VC_002] NOT NULL,
[CO_UNID_CONC] [dbo].[TD_VC_003] NOT NULL,
[NU_AMAR] [dbo].[TD_VC_008] NOT NULL,
[FE_AMAR] [dbo].[TD_DT_001] NOT NULL,
[NU_SECU] [dbo].[TD_IN_001] NOT NULL CONSTRAINT [DF__TDAMAR_AN__NU_SE__178D7CA5] DEFAULT ((0)),
[TI_ENTI] [dbo].[TD_VC_001] NULL,
[CO_ENTI] [dbo].[TD_VC_020] NOT NULL,
[FE_AMAR_DETA] [dbo].[TD_DT_001] NULL,
[TI_DOCU_ENTI] [dbo].[TD_VC_003] NOT NULL,
[NU_DOCU_ENTI] [dbo].[TD_VC_020] NOT NULL,
[CO_MONE_DOCU] [dbo].[TD_VC_003] NOT NULL,
[FE_DOCU] [dbo].[TD_DT_001] NULL,
[IM_DOCU] [dbo].[TD_NU_016_004] NOT NULL CONSTRAINT [DF__TDAMAR_AN__IM_DO__1881A0DE] DEFAULT ((0)),
[IM_SALD_DOCU] [dbo].[TD_NU_016_004] NULL CONSTRAINT [DF__TDAMAR_AN__IM_SA__1975C517] DEFAULT ((0)),
[IM_SALD_CONV] [dbo].[TD_NU_016_004] NULL CONSTRAINT [DF__TDAMAR_AN__IM_SA__1A69E950] DEFAULT ((0)),
[IM_DETA] [dbo].[TD_NU_016_004] NOT NULL CONSTRAINT [DF__TDAMAR_AN__IM_DE__1B5E0D89] DEFAULT ((0)),
[IM_DETA_NEGA] [dbo].[TD_NU_016_004] NOT NULL CONSTRAINT [DF__TDAMAR_AN__IM_DE__1C5231C2] DEFAULT ((0)),
[IM_CONV_DOCU] [dbo].[TD_NU_016_004] NOT NULL CONSTRAINT [DF__TDAMAR_AN__IM_CO__1D4655FB] DEFAULT ((0)),
[DE_OBSE] [dbo].[TD_VC_100] NULL,
[ST_CIER_DOCU] [dbo].[TD_VC_001] NULL,
[ST_CONT] [dbo].[TD_VC_001_INTE] NOT NULL CONSTRAINT [DF__TDAMAR_AN__ST_CO__1E3A7A34] DEFAULT ('N'),
[NU_PROC] [dbo].[TD_IN_001] NULL CONSTRAINT [DF__TDAMAR_AN__NU_PR__2022C2A6] DEFAULT ((0)),
[NU_CNTB_EMPR] [dbo].[TD_IN_001] NULL CONSTRAINT [DF__TDAMAR_AN__NU_CN__2116E6DF] DEFAULT ((0)),
[CO_USUA_CREA] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TDAMAR_AN__CO_US__220B0B18] DEFAULT (suser_sname()),
[FE_USUA_CREA] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TDAMAR_AN__FE_US__22FF2F51] DEFAULT (getdate()),
[CO_USUA_MODI] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TDAMAR_AN__CO_US__23F3538A] DEFAULT (suser_sname()),
[FE_USUA_MODI] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TDAMAR_AN__FE_US__24E777C3] DEFAULT (getdate())
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TDAMAR_ANTC] WITH NOCHECK ADD CONSTRAINT [CK__TDAMAR_AN__ST_CO__1F2E9E6D] CHECK NOT FOR REPLICATION (([ST_CONT]='P' OR [ST_CONT]='N'))
GO
ALTER TABLE [dbo].[TDAMAR_ANTC] ADD CONSTRAINT [PK__TDAMAR_A__F88147645C8290C7] PRIMARY KEY CLUSTERED  ([CO_EMPR], [CO_UNID_CONC], [NU_AMAR], [FE_AMAR], [NU_SECU]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TDAMAR_ANTC] ADD CONSTRAINT [FK__TDAMAR_ANTC__2117B236] FOREIGN KEY ([CO_EMPR], [CO_UNID_CONC], [NU_AMAR], [FE_AMAR]) REFERENCES [dbo].[TCAMAR_ANTC] ([CO_EMPR], [CO_UNID_CONC], [NU_AMAR], [FE_AMAR])
GO
